package atom.core0.j2ee.page;

public class Page implements java.io.Serializable{
	private int pageNumber;
	private int pageSize; 
	
	public Page() {
	}	
	public Page(int pageNumber, int pageSize) {
		super();
		this.pageNumber = pageNumber;
		this.pageSize = pageSize;
	}
	public int getPageNumber() {
		return pageNumber;
	}
	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getOffsetIndex() {
		if (pageNumber>0)
			return (pageNumber - 1) * pageSize;
		else
			return 0;
	}
	
	
}
